import request from '@/utils/request'

// 获取广告位及其对应广告
export const getAllAds = params => {
  return request({
    method: 'GET',
    url: '/gpt_patient/api/v1/gpt_one',
    params
  })
}

// 分页查询课程内容
export const addMother = data => {
  return request({
    method: 'POST',
    url: '/patientExamination/add',
    data
  })
}

// 获取已购课程
export const getLatestByRegistrationAndPhone = (patientRegistrationNumber, contactPhone) => {
  return request({
    method: 'GET',
    url: '/patientExamination/getLatestByRegistrationAndPhone',
    params: {
      patientRegistrationNumber,
      contactPhone
    }
  })
}

// 获取课程详情
export const getExaminationDate = (examinationDate) => {
  return request({
    method: 'GET',
    url: '/patientExamination/getExaminationDate',
    params: {
      examinationDate
    }
  })
}

// 获取课程章节
export const getSectionAndLesson = params => {
  return request({
    method: 'GET',
    url: '/front/course/session/getSectionAndLesson',
    params
  })
}

// 根据fileId获取阿里云对应的视频播放信息
export const getVideoInfo = params => {
  return request({
    method: 'GET',
    url: '/front/course/media/videoPlayInfo',
    params
  })
}
